package com.heima.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 赵超
 */
@Data
public class VendingMachineVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    private Integer vmType;
    private String innerCode;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long nodeId;

    private Integer vmStatus;
    private LocalDateTime lastSupplyTime;
    private String cityCode;
    private Integer areaId;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long createUserId;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long regionId;

    private Integer ownerId;
    private String ownerName;

    // businessId 是 Integer，小于 2^53，可不转（安全）
    private Integer businessId;

    private String clientId;
    private Double longitudes;
    private Double latitude;
    private String createUserName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    private VmTypeVo type;
    private NodeDetailVo node;
    private RegionVo region;
}